package org.csmzxy.class233440;

public class example1 {
    public static void main(String[] arg){
        Student student = new Student();
        student.name ="mm";
        student.age =19;
        System.out.println("我叫"+student.name+",我今年"+student.age+"岁。");
        System.out.println("我可执行如下方法：");
        student.eat();
        student.sleep();
        student.study();
        Teacher teacher = new Teacher();
        teacher.name ="czr";
        teacher.age = 30;
        teacher.salary = 5000;
        System.out.println("我叫"+teacher.name+",我今年"+teacher.age+"岁,"+"我的薪资是"+teacher.salary+"元/月。");
        System.out.println("我可执行如下方法：");
        teacher.eat();
        teacher.sleep();
        teacher.teach();
    }
}